package com.fumihiko.modules.wsbj.controller;

import java.util.Arrays;
import java.util.Map;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.fumihiko.modules.wsbj.entity.UpProAppointmentEntity;
import com.fumihiko.modules.wsbj.service.UpProAppointmentService;
import com.fumihiko.common.utils.PageUtils;
import com.fumihiko.common.utils.R;



/**
 * 预约信息
 *
 * @author hanwenpeng
 * @email devilzwy@gmail.com
 * @date 2022-01-20 09:34:06
 */
@RestController
@RequestMapping("wsbj/upproappointment")
public class UpProAppointmentController {
    @Autowired
    private UpProAppointmentService upProAppointmentService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    @RequiresPermissions("wsbj:upproappointment:list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = upProAppointmentService.queryPage(params);

        return R.ok().put("page", page);
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{pkId}")

    public R info(@PathVariable("pkId") String pkId){
		UpProAppointmentEntity upProAppointment = upProAppointmentService.getById(pkId);

        return R.ok().put("upProAppointment", upProAppointment);
    }
//
//    /**
//     * 保存
//     */
//    @RequestMapping("/save")
//    @RequiresPermissions("wsbj:upproappointment:save")
//    public R save(@RequestBody UpProAppointmentEntity upProAppointment){
//		upProAppointmentService.save(upProAppointment);
//
//        return R.ok();
//    }
//
//    /**
//     * 修改
//     */
//    @RequestMapping("/update")
//    @RequiresPermissions("wsbj:upproappointment:update")
//    public R update(@RequestBody UpProAppointmentEntity upProAppointment){
//		upProAppointmentService.updateById(upProAppointment);
//
//        return R.ok();
//    }
//
//    /**
//     * 删除
//     */
//    @RequestMapping("/delete")
//    @RequiresPermissions("wsbj:upproappointment:delete")
//    public R delete(@RequestBody String[] pkIds){
//		upProAppointmentService.removeByIds(Arrays.asList(pkIds));
//
//        return R.ok();
//    }

}
